import { createRouter, createWebHashHistory, type RouteRecordRaw } from 'vue-router'
import { routes as allroutes } from './routers'
import { transformRoutes } from './transform'

const routes = transformRoutes(allroutes) as RouteRecordRaw[]
const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export { routes, router }
